<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>网站后台管理模版</title>
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/admini/layui/css/layui.css" />
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/admini/css/admin.css" />
	</head>

	<body>
		<div class="page-content-wrap">
			<form class="layui-form" enctype="multipart/form-data" method="post" action="{:url('')}">
				<div class="layui-tab" style="margin: 0;">
					<ul class="layui-tab-title">
						<li class="layui-this">修改信息</li>
					</ul>
					<div class="layui-tab-content">
						<div class="layui-tab-item"></div>
						<div class="layui-tab-item layui-show">
							<div class="layui-form-item">
								<label class="layui-form-label">标题：</label>
								<div class="layui-input-block">
									<input type="text" name="id" value="{$data.id}" hidden="hidden">
									<input type="text" name="title" value="{$data.title}" required lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
								</div>
							</div>
							<div class="layui-form-item layui-form-text">
								<label class="layui-form-label">内容：</label>
								<div class="layui-input-block">
									<textarea id="content" type="text/plain" name="content" lay-verify="article_desc" placeholder="详细描述" style="display: none;">{$data.content|html_entity_decode}</textarea>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="layui-form-item" style="padding-left: 10px;">
					<div class="layui-input-block">
						<button class="layui-btn layui-btn-normal" lay-submit lay-filter="login">立即提交</button>
						<button type="reset" class="layui-btn layui-btn-primary">重置</button>
					</div>
				</div>
			</form>
		</div>
		<script src="__PUBLIC__/admini/layui/layui.js" type="text/javascript" charset="utf-8"></script>
		<script src="__PUBLIC__/admini/js/common.js" type="text/javascript" charset="utf-8"></script>
		<script>
			layui.use(['form', 'layedit'], function() {
				var form = layui.form(),
				layedit = layui.layedit;
				layedit.set({
			        uploadImage: {
			            url: '{:url("admini/index/uploads")}', //接口url
			            type: 'post' //默认post
			        }
			    });
			     var index = layedit.build('content');
				form.verify({
				    article_desc: function(value){
				        layedit.sync(index);
				    }
				});
			});
		</script>
	</body>

</html>